using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VPRFRANT
    {
        public DataRow Convert2PRFRANT(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryPRFRANT(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["PRFMANDANT"] = " ".PadRight(2 ); 
         dwReturn["PRFKUNDNR"] = " ".PadRight(8 ); 
         dwReturn["PRFVB"] = " ".PadRight(3 ); 
         dwReturn["PRFVG"] = " ".PadRight(3 ); 
         dwReturn["PRFADRSL"] = " ".PadRight(8 ); 
         dwReturn["PRFPLZ"] = " ".PadRight(12 ); 
         dwReturn["PRFBZ"] = " ".PadRight(2 ); 
         dwReturn["PRFLIEFBED"] = " ".PadRight(3 ); 
         dwReturn["PRFVERSART"] = " ".PadRight(3 ); 
         dwReturn["PRFSPED"] = " ".PadRight(3 ); 
         dwReturn["PRFPROGRP"] = " ".PadRight(3 ); 
         dwReturn["PRFARTGRP"] = " ".PadRight(3 ); 
         dwReturn["PRFKOLL"] = " ".PadRight(5 ); 
         dwReturn["PRFART"] = " ".PadRight(24 ); 
         dwReturn["PRFBRAND"] = " ".PadRight(5 ); 
         dwReturn["PRFVERSLO"] = " ".PadRight(2 ); 
         dwReturn["PRFEMPLAND"] = " ".PadRight(3 ); 
         dwReturn["PRFAENZL"] = " ".PadRight(0 ); 
         dwReturn["PRFAENB"] = " ".PadRight(8 ); 
         dwReturn["PRFAEND"] = " ".PadRight(0 ); 
         dwReturn["PRFNEUB"] = " ".PadRight(8 ); 
         dwReturn["PRFNEUD"] = " ".PadRight(0 ); 
         dwReturn["PRFWERT1"] = " ".PadRight(0 ); 
         dwReturn["PRFFRPB1"] = " ".PadRight(0 ); 
         dwReturn["PRFMENGE1"] = " ".PadRight(0 ); 
         dwReturn["PRFFRAB1"] = " ".PadRight(0 ); 
         dwReturn["PRFWERT2"] = " ".PadRight(0 ); 
         dwReturn["PRFFRPB2"] = " ".PadRight(0 ); 
         dwReturn["PRFMENGE2"] = " ".PadRight(0 ); 
         dwReturn["PRFFRAB2"] = " ".PadRight(0 ); 
         dwReturn["PRFWERT3"] = " ".PadRight(0 ); 
         dwReturn["PRFFRPB3"] = " ".PadRight(0 ); 
         dwReturn["PRFMENGE3"] = " ".PadRight(0 ); 
         dwReturn["PRFFRAB3"] = " ".PadRight(0 ); 
         dwReturn["PRFWERT4"] = " ".PadRight(0 ); 
         dwReturn["PRFFRPB4"] = " ".PadRight(0 ); 
         dwReturn["PRFMENGE4"] = " ".PadRight(0 ); 
         dwReturn["PRFFRAB4"] = " ".PadRight(0 ); 
         dwReturn["PRFWERT5"] = " ".PadRight(0 ); 
         dwReturn["PRFFRPB5"] = " ".PadRight(0 ); 
         dwReturn["PRFMENGE5"] = " ".PadRight(0 ); 
         dwReturn["PRFFRAB5"] = " ".PadRight(0 ); 
         dwReturn["PRFWERT6"] = " ".PadRight(0 ); 
         dwReturn["PRFFRPB6"] = " ".PadRight(0 ); 
         dwReturn["PRFMENGE6"] = " ".PadRight(0 ); 
         dwReturn["PRFFRAB6"] = " ".PadRight(0 ); 
         dwReturn["PRFWERT7"] = " ".PadRight(0 ); 
         dwReturn["PRFFRPB7"] = " ".PadRight(0 ); 
         dwReturn["PRFMENGE7"] = " ".PadRight(0 ); 
         dwReturn["PRFFRAB7"] = " ".PadRight(0 ); 
         dwReturn["PRFWERT8"] = " ".PadRight(0 ); 
         dwReturn["PRFFRPB8"] = " ".PadRight(0 ); 
         dwReturn["PRFMENGE8"] = " ".PadRight(0 ); 
         dwReturn["PRFFRAB8"] = " ".PadRight(0 ); 
         dwReturn["PRFWERT9"] = " ".PadRight(0 ); 
         dwReturn["PRFFRPB9"] = " ".PadRight(0 ); 
         dwReturn["PRFMENGE9"] = " ".PadRight(0 ); 
         dwReturn["PRFFRAB9"] = " ".PadRight(0 ); 
         dwReturn["PRFWERT10"] = " ".PadRight(0 ); 
         dwReturn["PRFFRPB10"] = " ".PadRight(0 ); 
         dwReturn["PRFMENGE10"] = " ".PadRight(0 ); 
         dwReturn["PRFFRAB10"] = " ".PadRight(0 ); 
         dwReturn["PRFMINFR"] = " ".PadRight(0 ); 
         dwReturn["PRFMEEH"] = " ".PadRight(3 ); 
         dwReturn["PRFVWERT1"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPPB1"] = " ".PadRight(0 ); 
         dwReturn["PRFVMENGE1"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPAB1"] = " ".PadRight(0 ); 
         dwReturn["PRFVWERT2"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPPB2"] = " ".PadRight(0 ); 
         dwReturn["PRFVMENGE2"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPAB2"] = " ".PadRight(0 ); 
         dwReturn["PRFVWERT3"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPPB3"] = " ".PadRight(0 ); 
         dwReturn["PRFVMENGE3"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPAB3"] = " ".PadRight(0 ); 
         dwReturn["PRFVWERT4"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPPB4"] = " ".PadRight(0 ); 
         dwReturn["PRFVMENGE4"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPAB4"] = " ".PadRight(0 ); 
         dwReturn["PRFVWERT5"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPPB5"] = " ".PadRight(0 ); 
         dwReturn["PRFVMENGE5"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPAB5"] = " ".PadRight(0 ); 
         dwReturn["PRFVWERT6"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPPB6"] = " ".PadRight(0 ); 
         dwReturn["PRFVMENGE6"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPAB6"] = " ".PadRight(0 ); 
         dwReturn["PRFVWERT7"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPPB7"] = " ".PadRight(0 ); 
         dwReturn["PRFVMENGE7"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPAB7"] = " ".PadRight(0 ); 
         dwReturn["PRFVWERT8"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPPB8"] = " ".PadRight(0 ); 
         dwReturn["PRFVMENGE8"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPAB8"] = " ".PadRight(0 ); 
         dwReturn["PRFVWERT9"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPPB9"] = " ".PadRight(0 ); 
         dwReturn["PRFVMENGE9"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPAB9"] = " ".PadRight(0 ); 
         dwReturn["PRFVWERT10"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPPB10"] = " ".PadRight(0 ); 
         dwReturn["PRFVMENGE10"] = " ".PadRight(0 ); 
         dwReturn["PRFVERPAB10"] = " ".PadRight(0 ); 
         dwReturn["PRFVMEEH"] = " ".PadRight(3 ); 
         dwReturn["PRFMINVP"] = " ".PadRight(0 ); 
         dwReturn["PRFFZUABART"] = " ".PadRight(3 ); 
         dwReturn["PRFVZUABART"] = " ".PadRight(3 ); 
         dwReturn["PRFEBENE"] = " ".PadRight(1 ); 
         dwReturn["PRFWAEHRSL"] = " ".PadRight(3 ); 
         dwReturn["PRFVTYP1"] = " ".PadRight(1 ); 
         dwReturn["PRFVERPART1"] = " ".PadRight(6 ); 
         dwReturn["PRFVERPWERT1"] = " ".PadRight(0 ); 
         dwReturn["PRFVTYP2"] = " ".PadRight(1 ); 
         dwReturn["PRFVERPART2"] = " ".PadRight(6 ); 
         dwReturn["PRFVERPWERT2"] = " ".PadRight(0 ); 
         dwReturn["PRFVTYP3"] = " ".PadRight(1 ); 
         dwReturn["PRFVERPART3"] = " ".PadRight(6 ); 
         dwReturn["PRFVERPWERT3"] = " ".PadRight(0 ); 
         dwReturn["PRFVTYP4"] = " ".PadRight(1 ); 
         dwReturn["PRFVERPART4"] = " ".PadRight(6 ); 
         dwReturn["PRFVERPWERT4"] = " ".PadRight(0 ); 
         dwReturn["PRFKZFRABR"] = " ".PadRight(1 ); 
         dwReturn["PRFFILLER"] = " ".PadRight(33 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapPRFRANT(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SavePRFRANT(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryPRFRANT(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapPRFRANT(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertPRFRANT(dwLocal, ITXDBVERSION);
            }
            UpdatePRFRANT(dwLocal);
        }
        public void InsertPRFRANT(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO PRFRANT(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryPRFRANT(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM PRFRANT WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM PRFRANT  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "PRFRANT";
            Return = Result;
            return Return;
        }
        public void DeletePRFRANT(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM PRFRANT   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdatePRFRANT(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE PRFRANT SET "
                    +"PRFMANDANT= :PRFMANDANT,"
                    +"PRFKUNDNR= :PRFKUNDNR,"
                    +"PRFVB= :PRFVB,"
                    +"PRFVG= :PRFVG,"
                    +"PRFADRSL= :PRFADRSL,"
                    +"PRFPLZ= :PRFPLZ,"
                    +"PRFBZ= :PRFBZ,"
                    +"PRFLIEFBED= :PRFLIEFBED,"
                    +"PRFVERSART= :PRFVERSART,"
                    +"PRFSPED= :PRFSPED,"
                    +"PRFPROGRP= :PRFPROGRP,"
                    +"PRFARTGRP= :PRFARTGRP,"
                    +"PRFKOLL= :PRFKOLL,"
                    +"PRFART= :PRFART,"
                    +"PRFBRAND= :PRFBRAND,"
                    +"PRFVERSLO= :PRFVERSLO,"
                    +"PRFEMPLAND= :PRFEMPLAND,"
                    +"PRFAENZL= :PRFAENZL,"
                    +"PRFAENB= :PRFAENB,"
                    +"PRFAEND= :PRFAEND,"
                    +"PRFNEUB= :PRFNEUB,"
                    +"PRFNEUD= :PRFNEUD,"
                    +"PRFWERT1= :PRFWERT1,"
                    +"PRFFRPB1= :PRFFRPB1,"
                    +"PRFMENGE1= :PRFMENGE1,"
                    +"PRFFRAB1= :PRFFRAB1,"
                    +"PRFWERT2= :PRFWERT2,"
                    +"PRFFRPB2= :PRFFRPB2,"
                    +"PRFMENGE2= :PRFMENGE2,"
                    +"PRFFRAB2= :PRFFRAB2,"
                    +"PRFWERT3= :PRFWERT3,"
                    +"PRFFRPB3= :PRFFRPB3,"
                    +"PRFMENGE3= :PRFMENGE3,"
                    +"PRFFRAB3= :PRFFRAB3,"
                    +"PRFWERT4= :PRFWERT4,"
                    +"PRFFRPB4= :PRFFRPB4,"
                    +"PRFMENGE4= :PRFMENGE4,"
                    +"PRFFRAB4= :PRFFRAB4,"
                    +"PRFWERT5= :PRFWERT5,"
                    +"PRFFRPB5= :PRFFRPB5,"
                    +"PRFMENGE5= :PRFMENGE5,"
                    +"PRFFRAB5= :PRFFRAB5,"
                    +"PRFWERT6= :PRFWERT6,"
                    +"PRFFRPB6= :PRFFRPB6,"
                    +"PRFMENGE6= :PRFMENGE6,"
                    +"PRFFRAB6= :PRFFRAB6,"
                    +"PRFWERT7= :PRFWERT7,"
                    +"PRFFRPB7= :PRFFRPB7,"
                    +"PRFMENGE7= :PRFMENGE7,"
                    +"PRFFRAB7= :PRFFRAB7,"
                    +"PRFWERT8= :PRFWERT8,"
                    +"PRFFRPB8= :PRFFRPB8,"
                    +"PRFMENGE8= :PRFMENGE8,"
                    +"PRFFRAB8= :PRFFRAB8,"
                    +"PRFWERT9= :PRFWERT9,"
                    +"PRFFRPB9= :PRFFRPB9,"
                    +"PRFMENGE9= :PRFMENGE9,"
                    +"PRFFRAB9= :PRFFRAB9,"
                    +"PRFWERT10= :PRFWERT10,"
                    +"PRFFRPB10= :PRFFRPB10,"
                    +"PRFMENGE10= :PRFMENGE10,"
                    +"PRFFRAB10= :PRFFRAB10,"
                    +"PRFMINFR= :PRFMINFR,"
                    +"PRFMEEH= :PRFMEEH,"
                    +"PRFVWERT1= :PRFVWERT1,"
                    +"PRFVERPPB1= :PRFVERPPB1,"
                    +"PRFVMENGE1= :PRFVMENGE1,"
                    +"PRFVERPAB1= :PRFVERPAB1,"
                    +"PRFVWERT2= :PRFVWERT2,"
                    +"PRFVERPPB2= :PRFVERPPB2,"
                    +"PRFVMENGE2= :PRFVMENGE2,"
                    +"PRFVERPAB2= :PRFVERPAB2,"
                    +"PRFVWERT3= :PRFVWERT3,"
                    +"PRFVERPPB3= :PRFVERPPB3,"
                    +"PRFVMENGE3= :PRFVMENGE3,"
                    +"PRFVERPAB3= :PRFVERPAB3,"
                    +"PRFVWERT4= :PRFVWERT4,"
                    +"PRFVERPPB4= :PRFVERPPB4,"
                    +"PRFVMENGE4= :PRFVMENGE4,"
                    +"PRFVERPAB4= :PRFVERPAB4,"
                    +"PRFVWERT5= :PRFVWERT5,"
                    +"PRFVERPPB5= :PRFVERPPB5,"
                    +"PRFVMENGE5= :PRFVMENGE5,"
                    +"PRFVERPAB5= :PRFVERPAB5,"
                    +"PRFVWERT6= :PRFVWERT6,"
                    +"PRFVERPPB6= :PRFVERPPB6,"
                    +"PRFVMENGE6= :PRFVMENGE6,"
                    +"PRFVERPAB6= :PRFVERPAB6,"
                    +"PRFVWERT7= :PRFVWERT7,"
                    +"PRFVERPPB7= :PRFVERPPB7,"
                    +"PRFVMENGE7= :PRFVMENGE7,"
                    +"PRFVERPAB7= :PRFVERPAB7,"
                    +"PRFVWERT8= :PRFVWERT8,"
                    +"PRFVERPPB8= :PRFVERPPB8,"
                    +"PRFVMENGE8= :PRFVMENGE8,"
                    +"PRFVERPAB8= :PRFVERPAB8,"
                    +"PRFVWERT9= :PRFVWERT9,"
                    +"PRFVERPPB9= :PRFVERPPB9,"
                    +"PRFVMENGE9= :PRFVMENGE9,"
                    +"PRFVERPAB9= :PRFVERPAB9,"
                    +"PRFVWERT10= :PRFVWERT10,"
                    +"PRFVERPPB10= :PRFVERPPB10,"
                    +"PRFVMENGE10= :PRFVMENGE10,"
                    +"PRFVERPAB10= :PRFVERPAB10,"
                    +"PRFVMEEH= :PRFVMEEH,"
                    +"PRFMINVP= :PRFMINVP,"
                    +"PRFFZUABART= :PRFFZUABART,"
                    +"PRFVZUABART= :PRFVZUABART,"
                    +"PRFEBENE= :PRFEBENE,"
                    +"PRFWAEHRSL= :PRFWAEHRSL,"
                    +"PRFVTYP1= :PRFVTYP1,"
                    +"PRFVERPART1= :PRFVERPART1,"
                    +"PRFVERPWERT1= :PRFVERPWERT1,"
                    +"PRFVTYP2= :PRFVTYP2,"
                    +"PRFVERPART2= :PRFVERPART2,"
                    +"PRFVERPWERT2= :PRFVERPWERT2,"
                    +"PRFVTYP3= :PRFVTYP3,"
                    +"PRFVERPART3= :PRFVERPART3,"
                    +"PRFVERPWERT3= :PRFVERPWERT3,"
                    +"PRFVTYP4= :PRFVTYP4,"
                    +"PRFVERPART4= :PRFVERPART4,"
                    +"PRFVERPWERT4= :PRFVERPWERT4,"
                    +"PRFKZFRABR= :PRFKZFRABR,"
                    +"PRFFILLER= :PRFFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("PRFMANDANT", OracleType.NVarChar).Value = dwData["PRFMANDANT"].ToString(); 
          or1.Parameters.Add("PRFKUNDNR", OracleType.NVarChar).Value = dwData["PRFKUNDNR"].ToString(); 
          or1.Parameters.Add("PRFVB", OracleType.NVarChar).Value = dwData["PRFVB"].ToString(); 
          or1.Parameters.Add("PRFVG", OracleType.NVarChar).Value = dwData["PRFVG"].ToString(); 
          or1.Parameters.Add("PRFADRSL", OracleType.NVarChar).Value = dwData["PRFADRSL"].ToString(); 
          or1.Parameters.Add("PRFPLZ", OracleType.NVarChar).Value = dwData["PRFPLZ"].ToString(); 
          or1.Parameters.Add("PRFBZ", OracleType.NVarChar).Value = dwData["PRFBZ"].ToString(); 
          or1.Parameters.Add("PRFLIEFBED", OracleType.NVarChar).Value = dwData["PRFLIEFBED"].ToString(); 
          or1.Parameters.Add("PRFVERSART", OracleType.NVarChar).Value = dwData["PRFVERSART"].ToString(); 
          or1.Parameters.Add("PRFSPED", OracleType.NVarChar).Value = dwData["PRFSPED"].ToString(); 
          or1.Parameters.Add("PRFPROGRP", OracleType.NVarChar).Value = dwData["PRFPROGRP"].ToString(); 
          or1.Parameters.Add("PRFARTGRP", OracleType.NVarChar).Value = dwData["PRFARTGRP"].ToString(); 
          or1.Parameters.Add("PRFKOLL", OracleType.NVarChar).Value = dwData["PRFKOLL"].ToString(); 
          or1.Parameters.Add("PRFART", OracleType.NVarChar).Value = dwData["PRFART"].ToString(); 
          or1.Parameters.Add("PRFBRAND", OracleType.NVarChar).Value = dwData["PRFBRAND"].ToString(); 
          or1.Parameters.Add("PRFVERSLO", OracleType.NVarChar).Value = dwData["PRFVERSLO"].ToString(); 
          or1.Parameters.Add("PRFEMPLAND", OracleType.NVarChar).Value = dwData["PRFEMPLAND"].ToString(); 
          or1.Parameters.Add("PRFAENZL", OracleType.NVarChar).Value = dwData["PRFAENZL"].ToString(); 
          or1.Parameters.Add("PRFAENB", OracleType.NVarChar).Value = dwData["PRFAENB"].ToString(); 
          or1.Parameters.Add("PRFAEND", OracleType.NVarChar).Value = dwData["PRFAEND"].ToString(); 
          or1.Parameters.Add("PRFNEUB", OracleType.NVarChar).Value = dwData["PRFNEUB"].ToString(); 
          or1.Parameters.Add("PRFNEUD", OracleType.NVarChar).Value = dwData["PRFNEUD"].ToString(); 
          or1.Parameters.Add("PRFWERT1", OracleType.NVarChar).Value = dwData["PRFWERT1"].ToString(); 
          or1.Parameters.Add("PRFFRPB1", OracleType.NVarChar).Value = dwData["PRFFRPB1"].ToString(); 
          or1.Parameters.Add("PRFMENGE1", OracleType.NVarChar).Value = dwData["PRFMENGE1"].ToString(); 
          or1.Parameters.Add("PRFFRAB1", OracleType.NVarChar).Value = dwData["PRFFRAB1"].ToString(); 
          or1.Parameters.Add("PRFWERT2", OracleType.NVarChar).Value = dwData["PRFWERT2"].ToString(); 
          or1.Parameters.Add("PRFFRPB2", OracleType.NVarChar).Value = dwData["PRFFRPB2"].ToString(); 
          or1.Parameters.Add("PRFMENGE2", OracleType.NVarChar).Value = dwData["PRFMENGE2"].ToString(); 
          or1.Parameters.Add("PRFFRAB2", OracleType.NVarChar).Value = dwData["PRFFRAB2"].ToString(); 
          or1.Parameters.Add("PRFWERT3", OracleType.NVarChar).Value = dwData["PRFWERT3"].ToString(); 
          or1.Parameters.Add("PRFFRPB3", OracleType.NVarChar).Value = dwData["PRFFRPB3"].ToString(); 
          or1.Parameters.Add("PRFMENGE3", OracleType.NVarChar).Value = dwData["PRFMENGE3"].ToString(); 
          or1.Parameters.Add("PRFFRAB3", OracleType.NVarChar).Value = dwData["PRFFRAB3"].ToString(); 
          or1.Parameters.Add("PRFWERT4", OracleType.NVarChar).Value = dwData["PRFWERT4"].ToString(); 
          or1.Parameters.Add("PRFFRPB4", OracleType.NVarChar).Value = dwData["PRFFRPB4"].ToString(); 
          or1.Parameters.Add("PRFMENGE4", OracleType.NVarChar).Value = dwData["PRFMENGE4"].ToString(); 
          or1.Parameters.Add("PRFFRAB4", OracleType.NVarChar).Value = dwData["PRFFRAB4"].ToString(); 
          or1.Parameters.Add("PRFWERT5", OracleType.NVarChar).Value = dwData["PRFWERT5"].ToString(); 
          or1.Parameters.Add("PRFFRPB5", OracleType.NVarChar).Value = dwData["PRFFRPB5"].ToString(); 
          or1.Parameters.Add("PRFMENGE5", OracleType.NVarChar).Value = dwData["PRFMENGE5"].ToString(); 
          or1.Parameters.Add("PRFFRAB5", OracleType.NVarChar).Value = dwData["PRFFRAB5"].ToString(); 
          or1.Parameters.Add("PRFWERT6", OracleType.NVarChar).Value = dwData["PRFWERT6"].ToString(); 
          or1.Parameters.Add("PRFFRPB6", OracleType.NVarChar).Value = dwData["PRFFRPB6"].ToString(); 
          or1.Parameters.Add("PRFMENGE6", OracleType.NVarChar).Value = dwData["PRFMENGE6"].ToString(); 
          or1.Parameters.Add("PRFFRAB6", OracleType.NVarChar).Value = dwData["PRFFRAB6"].ToString(); 
          or1.Parameters.Add("PRFWERT7", OracleType.NVarChar).Value = dwData["PRFWERT7"].ToString(); 
          or1.Parameters.Add("PRFFRPB7", OracleType.NVarChar).Value = dwData["PRFFRPB7"].ToString(); 
          or1.Parameters.Add("PRFMENGE7", OracleType.NVarChar).Value = dwData["PRFMENGE7"].ToString(); 
          or1.Parameters.Add("PRFFRAB7", OracleType.NVarChar).Value = dwData["PRFFRAB7"].ToString(); 
          or1.Parameters.Add("PRFWERT8", OracleType.NVarChar).Value = dwData["PRFWERT8"].ToString(); 
          or1.Parameters.Add("PRFFRPB8", OracleType.NVarChar).Value = dwData["PRFFRPB8"].ToString(); 
          or1.Parameters.Add("PRFMENGE8", OracleType.NVarChar).Value = dwData["PRFMENGE8"].ToString(); 
          or1.Parameters.Add("PRFFRAB8", OracleType.NVarChar).Value = dwData["PRFFRAB8"].ToString(); 
          or1.Parameters.Add("PRFWERT9", OracleType.NVarChar).Value = dwData["PRFWERT9"].ToString(); 
          or1.Parameters.Add("PRFFRPB9", OracleType.NVarChar).Value = dwData["PRFFRPB9"].ToString(); 
          or1.Parameters.Add("PRFMENGE9", OracleType.NVarChar).Value = dwData["PRFMENGE9"].ToString(); 
          or1.Parameters.Add("PRFFRAB9", OracleType.NVarChar).Value = dwData["PRFFRAB9"].ToString(); 
          or1.Parameters.Add("PRFWERT10", OracleType.NVarChar).Value = dwData["PRFWERT10"].ToString(); 
          or1.Parameters.Add("PRFFRPB10", OracleType.NVarChar).Value = dwData["PRFFRPB10"].ToString(); 
          or1.Parameters.Add("PRFMENGE10", OracleType.NVarChar).Value = dwData["PRFMENGE10"].ToString(); 
          or1.Parameters.Add("PRFFRAB10", OracleType.NVarChar).Value = dwData["PRFFRAB10"].ToString(); 
          or1.Parameters.Add("PRFMINFR", OracleType.NVarChar).Value = dwData["PRFMINFR"].ToString(); 
          or1.Parameters.Add("PRFMEEH", OracleType.NVarChar).Value = dwData["PRFMEEH"].ToString(); 
          or1.Parameters.Add("PRFVWERT1", OracleType.NVarChar).Value = dwData["PRFVWERT1"].ToString(); 
          or1.Parameters.Add("PRFVERPPB1", OracleType.NVarChar).Value = dwData["PRFVERPPB1"].ToString(); 
          or1.Parameters.Add("PRFVMENGE1", OracleType.NVarChar).Value = dwData["PRFVMENGE1"].ToString(); 
          or1.Parameters.Add("PRFVERPAB1", OracleType.NVarChar).Value = dwData["PRFVERPAB1"].ToString(); 
          or1.Parameters.Add("PRFVWERT2", OracleType.NVarChar).Value = dwData["PRFVWERT2"].ToString(); 
          or1.Parameters.Add("PRFVERPPB2", OracleType.NVarChar).Value = dwData["PRFVERPPB2"].ToString(); 
          or1.Parameters.Add("PRFVMENGE2", OracleType.NVarChar).Value = dwData["PRFVMENGE2"].ToString(); 
          or1.Parameters.Add("PRFVERPAB2", OracleType.NVarChar).Value = dwData["PRFVERPAB2"].ToString(); 
          or1.Parameters.Add("PRFVWERT3", OracleType.NVarChar).Value = dwData["PRFVWERT3"].ToString(); 
          or1.Parameters.Add("PRFVERPPB3", OracleType.NVarChar).Value = dwData["PRFVERPPB3"].ToString(); 
          or1.Parameters.Add("PRFVMENGE3", OracleType.NVarChar).Value = dwData["PRFVMENGE3"].ToString(); 
          or1.Parameters.Add("PRFVERPAB3", OracleType.NVarChar).Value = dwData["PRFVERPAB3"].ToString(); 
          or1.Parameters.Add("PRFVWERT4", OracleType.NVarChar).Value = dwData["PRFVWERT4"].ToString(); 
          or1.Parameters.Add("PRFVERPPB4", OracleType.NVarChar).Value = dwData["PRFVERPPB4"].ToString(); 
          or1.Parameters.Add("PRFVMENGE4", OracleType.NVarChar).Value = dwData["PRFVMENGE4"].ToString(); 
          or1.Parameters.Add("PRFVERPAB4", OracleType.NVarChar).Value = dwData["PRFVERPAB4"].ToString(); 
          or1.Parameters.Add("PRFVWERT5", OracleType.NVarChar).Value = dwData["PRFVWERT5"].ToString(); 
          or1.Parameters.Add("PRFVERPPB5", OracleType.NVarChar).Value = dwData["PRFVERPPB5"].ToString(); 
          or1.Parameters.Add("PRFVMENGE5", OracleType.NVarChar).Value = dwData["PRFVMENGE5"].ToString(); 
          or1.Parameters.Add("PRFVERPAB5", OracleType.NVarChar).Value = dwData["PRFVERPAB5"].ToString(); 
          or1.Parameters.Add("PRFVWERT6", OracleType.NVarChar).Value = dwData["PRFVWERT6"].ToString(); 
          or1.Parameters.Add("PRFVERPPB6", OracleType.NVarChar).Value = dwData["PRFVERPPB6"].ToString(); 
          or1.Parameters.Add("PRFVMENGE6", OracleType.NVarChar).Value = dwData["PRFVMENGE6"].ToString(); 
          or1.Parameters.Add("PRFVERPAB6", OracleType.NVarChar).Value = dwData["PRFVERPAB6"].ToString(); 
          or1.Parameters.Add("PRFVWERT7", OracleType.NVarChar).Value = dwData["PRFVWERT7"].ToString(); 
          or1.Parameters.Add("PRFVERPPB7", OracleType.NVarChar).Value = dwData["PRFVERPPB7"].ToString(); 
          or1.Parameters.Add("PRFVMENGE7", OracleType.NVarChar).Value = dwData["PRFVMENGE7"].ToString(); 
          or1.Parameters.Add("PRFVERPAB7", OracleType.NVarChar).Value = dwData["PRFVERPAB7"].ToString(); 
          or1.Parameters.Add("PRFVWERT8", OracleType.NVarChar).Value = dwData["PRFVWERT8"].ToString(); 
          or1.Parameters.Add("PRFVERPPB8", OracleType.NVarChar).Value = dwData["PRFVERPPB8"].ToString(); 
          or1.Parameters.Add("PRFVMENGE8", OracleType.NVarChar).Value = dwData["PRFVMENGE8"].ToString(); 
          or1.Parameters.Add("PRFVERPAB8", OracleType.NVarChar).Value = dwData["PRFVERPAB8"].ToString(); 
          or1.Parameters.Add("PRFVWERT9", OracleType.NVarChar).Value = dwData["PRFVWERT9"].ToString(); 
          or1.Parameters.Add("PRFVERPPB9", OracleType.NVarChar).Value = dwData["PRFVERPPB9"].ToString(); 
          or1.Parameters.Add("PRFVMENGE9", OracleType.NVarChar).Value = dwData["PRFVMENGE9"].ToString(); 
          or1.Parameters.Add("PRFVERPAB9", OracleType.NVarChar).Value = dwData["PRFVERPAB9"].ToString(); 
          or1.Parameters.Add("PRFVWERT10", OracleType.NVarChar).Value = dwData["PRFVWERT10"].ToString(); 
          or1.Parameters.Add("PRFVERPPB10", OracleType.NVarChar).Value = dwData["PRFVERPPB10"].ToString(); 
          or1.Parameters.Add("PRFVMENGE10", OracleType.NVarChar).Value = dwData["PRFVMENGE10"].ToString(); 
          or1.Parameters.Add("PRFVERPAB10", OracleType.NVarChar).Value = dwData["PRFVERPAB10"].ToString(); 
          or1.Parameters.Add("PRFVMEEH", OracleType.NVarChar).Value = dwData["PRFVMEEH"].ToString(); 
          or1.Parameters.Add("PRFMINVP", OracleType.NVarChar).Value = dwData["PRFMINVP"].ToString(); 
          or1.Parameters.Add("PRFFZUABART", OracleType.NVarChar).Value = dwData["PRFFZUABART"].ToString(); 
          or1.Parameters.Add("PRFVZUABART", OracleType.NVarChar).Value = dwData["PRFVZUABART"].ToString(); 
          or1.Parameters.Add("PRFEBENE", OracleType.NVarChar).Value = dwData["PRFEBENE"].ToString(); 
          or1.Parameters.Add("PRFWAEHRSL", OracleType.NVarChar).Value = dwData["PRFWAEHRSL"].ToString(); 
          or1.Parameters.Add("PRFVTYP1", OracleType.NVarChar).Value = dwData["PRFVTYP1"].ToString(); 
          or1.Parameters.Add("PRFVERPART1", OracleType.NVarChar).Value = dwData["PRFVERPART1"].ToString(); 
          or1.Parameters.Add("PRFVERPWERT1", OracleType.NVarChar).Value = dwData["PRFVERPWERT1"].ToString(); 
          or1.Parameters.Add("PRFVTYP2", OracleType.NVarChar).Value = dwData["PRFVTYP2"].ToString(); 
          or1.Parameters.Add("PRFVERPART2", OracleType.NVarChar).Value = dwData["PRFVERPART2"].ToString(); 
          or1.Parameters.Add("PRFVERPWERT2", OracleType.NVarChar).Value = dwData["PRFVERPWERT2"].ToString(); 
          or1.Parameters.Add("PRFVTYP3", OracleType.NVarChar).Value = dwData["PRFVTYP3"].ToString(); 
          or1.Parameters.Add("PRFVERPART3", OracleType.NVarChar).Value = dwData["PRFVERPART3"].ToString(); 
          or1.Parameters.Add("PRFVERPWERT3", OracleType.NVarChar).Value = dwData["PRFVERPWERT3"].ToString(); 
          or1.Parameters.Add("PRFVTYP4", OracleType.NVarChar).Value = dwData["PRFVTYP4"].ToString(); 
          or1.Parameters.Add("PRFVERPART4", OracleType.NVarChar).Value = dwData["PRFVERPART4"].ToString(); 
          or1.Parameters.Add("PRFVERPWERT4", OracleType.NVarChar).Value = dwData["PRFVERPWERT4"].ToString(); 
          or1.Parameters.Add("PRFKZFRABR", OracleType.NVarChar).Value = dwData["PRFKZFRABR"].ToString(); 
          or1.Parameters.Add("PRFFILLER", OracleType.NVarChar).Value = dwData["PRFFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
